package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.dto.RightsManagementDto;
import com.neu.fenli2023623.entity.RightsManagement;
import com.neu.fenli2023623.mapper.RightsManagementMapper;
import com.neu.fenli2023623.service.RightsManagementsService;
import com.neu.fenli2023623.vo.RightVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RightsManagementsServiceImpl implements RightsManagementsService {
    @Autowired
    private RightsManagementMapper rightsManagementMapper;
    @Override
    public List<RightsManagement> selectAll(RightsManagementDto rightsManagementDto) {
        return rightsManagementMapper.selectAll(rightsManagementDto);
    }

    @Override
    public int insertSelective(RightsManagement rightsManagement) {
        return rightsManagementMapper.insertSelective(rightsManagement);
    }

    @Override
    public int del(Long id) {
        return rightsManagementMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(RightsManagement rightsManagement) {
        return rightsManagementMapper.updateByPrimaryKeySelective(rightsManagement);
    }

    @Override
    public List<RightsManagement> selectExportData(RightVo rightVo) {
        return rightsManagementMapper.selectExportData(rightVo);
    }
}
